#ifndef _CHARACTER
#define _CHARACTER

#include <vector>
#include <cv.h>
#include "segment.h"
#include "rule.h"

class Character {
    vector<Segment> segments;
    Mat renderedChar;
    int sx;
    int sy;
public:
    Character(int, int);
    Character(int, int, vector<Segment>);

    Segment getRandomSegment();

    void applyRule(Rule rule, Segment s);
    void applyInitialRule(Rule rule);

    void addSegment(Segment seg) { segments.push_back(seg); }

    void render();

    void display();
};

#endif
